package com.app.controller;


import com.app.common.Result;
import com.app.model.ClassificationSubclass;
import com.app.service.IClassificationSubclassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 团购分类子类表 前端控制器
 * </p>
 *
 * @author shaokuiling
 * @since 2024-09-24
 */
@RestController
@RequestMapping("/classificationSubclass")
public class ClassificationSubclassController {
    @Autowired
    private IClassificationSubclassService classificationSubclassService;


    /**
     * 管理后台————新增
     * @param classificationSubclass
     * @return
     */
    @PostMapping("/addAndUpdate")
    public Result addAndUpdate(@RequestBody ClassificationSubclass classificationSubclass){
        return classificationSubclassService.addAndUpdate(classificationSubclass);
    }

    /**
     * 管理后台————删除
     * @param id
     * @return
     */
    @GetMapping("/deleteById")
    public Result deleteById(Integer id){
        return classificationSubclassService.daleteById(id);
    }

    
}
